package com.csnf.service.impl;

import com.csnf.dao.StudentDao;
import com.csnf.dao.impl.StudentDaolmpl;
import com.csnf.entity.Student;
import com.csnf.service.StudentService;

import java.util.List;

public  class StudentServicelmpl implements StudentService {
    StudentDao studentDao = new StudentDaolmpl() {

    };
    @Override
    public void addStudent(Student student) throws Exception {
        studentDao.addStudent(student);
    }
    @Override
    public List<Student> gatAll() {
        return studentDao.getAll();
    }

    @Override
    public void deleteById(int id) {
        studentDao.deleteById(id);
    }
}